<?xml version="1.0" ?>
<!DOCTYPE xsl:stylesheet SYSTEM "chrome://music-recommendations/locale/recommendations.dtd">
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
                xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  <xsl:output method="xml" indent="yes" />

  <xsl:template match="/artist">
    <vbox id="music-recommendations-list">
      <hbox class="artist-title-box" onclick="window.top.gBrowser.loadURI(&quot;{url}&quot;);">
        <description class="artist-name">
          <xsl:value-of select="name" />
        </description>
        <image class="artist-img" src="{image[@size='medium']/text()}" />
      </hbox>

      <description id="artist-description">
        <xsl:value-of select="bio/summary" />
      </description>

      <description class="similar-artists-title" value="&music-recommendations.similarartists;" />

      <vbox class="similar-artists-box">
        <xsl:for-each select="similar/artist">
          <hbox>
            <hbox class="similar-artist">
              <vbox>
                <image src="{image[@size='small']/text()}" onclick="window.top.gBrowser.loadURI(&quot;{url}&quot;);"
                       tooltiptext="&music-recommendations.lastfmclick;" />
              </vbox>
              <vbox>
                <xsl:if test="@count&gt;'0'">
                  <xsl:attribute name="onclick">
                    <xsl:text>MusicRecommendations.showMedia(&quot;</xsl:text>
                    <xsl:value-of select="name" />
                    <xsl:text>&quot;);</xsl:text>
                  </xsl:attribute>
                  <xsl:attribute name="tooltiptext">
                    <xsl:text>&music-recommendations.libraryclick;</xsl:text>
                  </xsl:attribute>
                  <xsl:attribute name="class">
                    <xsl:text>similar-artist link</xsl:text>
                  </xsl:attribute>
                </xsl:if>
                <description value="{name/text()}" />
                <description>
                  <xsl:attribute name="value">
                    <xsl:choose>
                      <xsl:when test="@count='0'">
                        <xsl:text>&music-recommendations.notracks;</xsl:text>
                      </xsl:when>
                      <xsl:when test="@count='1'">
                        <xsl:text>&music-recommendations.onetrack;</xsl:text>
                      </xsl:when>
                      <xsl:otherwise>
                        <xsl:value-of select="@count" />
                        <xsl:text>&music-recommendations.tracks;</xsl:text>
                      </xsl:otherwise>
                    </xsl:choose>
                  </xsl:attribute>
                </description>
              </vbox>
            </hbox>
          </hbox>
        </xsl:for-each>
      </vbox>
    </vbox>
  </xsl:template>

</xsl:stylesheet>
